﻿cmake_minimum_required(VERSION 3.8)

project(xrtclient)
add_definitions("-g -pipe -W  -fPIC -std=gnu++14 -DWEBRTC_POSIX -DWEBRTC_LINUX -DICE_POSIX")
set(ABSL_HAVE_EXCEPTIONS,on)

# 默认存放静态库的目录
# set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_SYSTEM_NAME}/lib)
# # 默认存放动态库的目录
# set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_SYSTEM_NAME}/lib)
# #  默认存放可执行文件的目录
# set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_SYSTEM_NAME}/bin)
# set(XRTC_DIR ${CMAKE_CURRENT_SOURCE_DIR})
# set(XRTC_THIRD_PARTY_DIR ${CMAKE_CURRENT_SOURCE_DIR})
include_directories(
	${CMAKE_CURRENT_SOURCE_DIR}
	${CMAKE_CURRENT_SOURCE_DIR}/include


)

link_directories(
	${CMAKE_CURRENT_SOURCE_DIR}/lib
)

file(GLOB all_src
	./xrtc/*.cpp
	./xrtc/base/*.cpp
	./xrtc/device/*.cpp
	./xrtc/media/base/*.cpp
	./xrtc/media/chain/*.cpp
	./xrtc/media/source/*.cpp
	./xrtc/media/sink/*.cpp
	./xrtc/media/filter/*.cpp
	./xrtc/rtc/pc/*.cpp
	./xrtc/rtc/modules/rtp_rtcp/*.cpp
	./xrtc/rtc/modules/rtp_rtcp/rtcp_packet/*.cpp
	./xrtc/rtc/video/*.cpp

)

add_executable(xrtclient ${all_src})

#target_link_libraries(xrtclient libabsl_bad_optional_access.a libabsl_strings.a libabsl_throw_delegate.a libjsoncpp.a liblibice.a libssl.a libcrypto.a libcurl.a libwebrtc.a libev.a)

target_link_libraries(xrtclient liblibice.a liblibwebrtc.a libabsl_bad_optional_access.a libabsl_strings.a libabsl_throw_delegate.a libabsl_bad_variant_access.a
 libev.a libcurl.a libjsoncpp.a libssl.a libcrypto.a  -lstdc++ -ldl)